﻿using System;
using Zeus.Thunder.Core;

namespace SharpTrainer.Basic
{
    class DynNumParam : ITestCase
    {
        public void Run()
        {
            int sum = 0;
            sum = Add(10, 8, 9, 100, 105, -10);
            Console.WriteLine("Sum is: {0}", sum);
            Console.Read();
        }

        private int Add(params int[] values)
        {
            int sum = 0;

            if (values != null)
            {
                for (int i = 0; i < values.Length; i++)
                    sum += values[i];
            }

            return sum;
        }
    }
}
